package com.itheima.chapter07.exception;

public class throwable {
    public static void main(String[] args) {
        System.out.println("开始");
        methood();
        System.out.println("结束");
    }

    private static void methood() {
        try {
            int[] arr ={1,2,3,4};
            System.out.println(arr[5]);
            System.out.println("能访问吗？");
        } catch (ArrayIndexOutOfBoundsException e) {
            String message = e.getMessage();
            System.out.println(message);
            String string = e.toString();
            System.out.println(string);
            e.printStackTrace();
        }
        System.out.println("123212121");
    }
}
